scala_library(
    sources = ["*.scala"],
    platform = "java8",
    strict_deps = False,
    tags = ["bazel-compatible"],
    dependencies = [
        ":configs",
        "3rdparty/jvm/storm:heron-oss-storm",
        "3rdparty/src/jvm/com/twitter/scalding:args",
        "3rdparty/src/jvm/com/twitter/summingbird:storm",
        "src/java/com/twitter/heron/util",
        "src/java/com/twitter/ml",
        "src/scala/com/twitter/storehaus_internal/nighthawk_kv",
        "src/scala/com/twitter/summingbird_internal/bijection:bijection-implicits",
        "src/scala/com/twitter/summingbird_internal/runner/common",
        "src/scala/com/twitter/summingbird_internal/runner/storm",
        "src/scala/com/twitter/timelines/prediction/features/common",
        "timelines/data_processing/ml_util/aggregation_framework:user_job",
    ],
)

scala_library(
    name = "configs",
    sources = [
        "NighthawkUnderlyingStoreConfig.scala",
        "OnlineAggregationConfigTrait.scala",
        "OnlineAggregationStoresTrait.scala",
        "RealTimeAggregateStore.scala",
        "RealTimeAggregatesJobConfig.scala",
        "StormAggregateSource.scala",
    ],
    platform = "java8",
    strict_deps = True,
    tags = ["bazel-compatible"],
    dependencies = [
        ":base-config",
        "3rdparty/jvm/storm:heron-oss-storm",
        "3rdparty/src/jvm/com/twitter/summingbird:core",
        "3rdparty/src/jvm/com/twitter/summingbird:storm",
        "finagle/finagle-core/src/main",
        "src/java/com/twitter/ml/api:api-base",
        "src/scala/com/twitter/storehaus_internal/memcache",
        "src/scala/com/twitter/storehaus_internal/memcache/config",
        "src/scala/com/twitter/storehaus_internal/nighthawk_kv",
        "src/scala/com/twitter/storehaus_internal/nighthawk_kv/config",
        "src/scala/com/twitter/storehaus_internal/online",
        "src/scala/com/twitter/storehaus_internal/store",
        "src/scala/com/twitter/storehaus_internal/util",
        "src/scala/com/twitter/summingbird_internal/runner/store_config",
        "src/thrift/com/twitter/clientapp/gen:clientapp-java",
        "src/thrift/com/twitter/ml/api:data-java",
        "src/thrift/com/twitter/ml/api:data-scala",
        "src/thrift/com/twitter/ml/api:feature_context-java",
        "timelines/data_processing/ml_util/aggregation_framework:common_types",
        "timelines/data_processing/ml_util/transforms",
        "util/util-core:scala",
        "util/util-core:util-core-util",
        "util/util-stats/src/main/scala/com/twitter/finagle/stats",
    ],
)

scala_library(
    name = "base-config",
    sources = [
        "OnlineAggregationConfigTrait.scala",
    ],
    platform = "java8",
    strict_deps = True,
    tags = ["bazel-compatible"],
    dependencies = [
        "src/java/com/twitter/ml/api:api-base",
        "timelines/data_processing/ml_util/aggregation_framework:common_types",
    ],
)
